from django.db import models

# Create your models here.

FILESTATUS=(
    (0,"未上传"),
    (1,"正在上传"),
    (2,"上传成功"),
    (3,"上传失败")
)

PARSESTATUS=(
    (0,"未入库"),
    (1,"正在入库"),
    (2,"入库成功"),
    (3,"入库失败")
)

class UploadStatus(models.Model):
    id=models.AutoField(primary_key=True)
    name=models.CharField(max_length=100,blank=False,null=False,verbose_name="文件名")
    upload=models.CharField(choices=FILESTATUS,max_length=20,verbose_name="文件上传状态")
    parse=models.CharField(choices=PARSESTATUS,max_length=20,verbose_name="文件处理状态")
    file=models.FileField(upload_to="source-product-name")

    # def __str__(self):
    #     return self.get_upload_display(),self.get_parse_display()
